<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="../../js/vue.js"></script>
<body>
    <div id="root"> 
         <h2>欢迎来到学习</h2>
         <!-- <button v-on:click="showInfo1">点我提示信息1(不传参)</button> -->
         <button @click="showInfo1">点我提示信息1(不传参)</button>
         <button @click="showInfo2($event,66)">点我提示信息2(传参)</button>
    </div>
</body>
<script>
     Vue.config.productionTip = false //组织vue在启动时生成生产提示
     const vm = new Vue({
         el:'#root',
         data:{
             name:'Vue'
         },
         methods:{
             showInfo1(event){
                 alert('你好Vue')
             },
             showInfo2(event,number){
                 alert('hello!!!')
             }
         }
     })
</script>
</html>